	
		var mainWin = null;
		
		function getRootPath(){ 
			var strFullPath=window.document.location.href; 
			var strPath=window.document.location.pathname; 
			var pos=strFullPath.indexOf(strPath); 
			var prePath=strFullPath.substring(0,pos); 
			var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1); 
			return(prePath+postPath); 
		}
		
		function openPostWindow(url, params, opt) {
			if ("undefined" == typeof(mainWin)||mainWin==null||mainWin .closed){
			    mainWin = window.open("", "",opt);
			}else{
				mainWin.focus();
			}
			var formStr = '';
		     //设置样式为隐藏，打开新标签再跳转页面前，如果有可现实的表单选项，用户会看到表单内容数据
		     formStr = '<form style="visibility:hidden;" method="POST" action="' + url + '">';
			for(var para in (params)){
				formStr += '<input type="hidden" name="'+para+'" value="' + params[para] + '" />'
			}
			formStr += '</form>';
		    mainWin.document.body.innerHTML = formStr;
		    mainWin.document.forms[0].submit();
		    
		    return mainWin;
		}
		
		//返回
		function goBack(){
			javascript:history.go(-1);
		}
		
		function getOpt(){
			var h = screen.availHeight-64;
			var w = screen.availWidth-20;
			var opt = 'height='+ new String(h) + ',top=0,left=0,width=' + new String(w) + ',location=no,menubar=no,resizable=yes,toolbar=no,status=yes';
			return opt;
		}
	
		function inSys(url, queryString) {
			var userName = $("#userName").val();
			var syncurl = getRootPath();
			var basePath = syncurl+'/syncData.action';
			$.ajax({
			 	url: basePath,
				type:'post',
			 	data:{"userName":userName},
			 	dataType:"json",
			 	success:function(syncData){
			 		if(syncData == null || syncData == "" || syncData == "-1"){
						alert("未知数据，请先登录腾讯通后再操作！");
					}else{
						var opt = getOpt();
						if(url==''){
							url = "page/index.action";
						}
						var data = {};
						data["syncurl"] = syncurl;
						data["userName"] = userName;
						data["syncData"] = syncData;
						
						if(url.indexOf("page/index.action")>=0){
							if(queryString){
								url += "?"+queryString;
							}
							openPostWindow(url, data, opt);
						}else{
							if(queryString){
								url += "?"+queryString;
							}
							var fromFile = createFrom(url); 
							loadFrom("userName", userName, fromFile);
							loadFrom("syncData", syncData, fromFile);
							fromFile.submit();
						}
					}
				}
			}); 
		}
